<template>
	<view>
		<!-- 		<uni-nav-bar>
			<u-tabs :list="list1" @click="clickTab" :scrollable="false"></u-tabs>
		</uni-nav-bar> -->
		<view>
			<up-input placeholder="请输入完整的主题标题" border="bottom" v-model="topicName" @change="change"></up-input>
		</view>
		<!-- <u-divider></u-divider> -->
		<view class="bottom-sumit">
			<view class="bottom-sumit-text" @click="release(topicName)">
				发布
			</view>
		</view>
	</view>

</template>

<script setup>
	import {
		ref
	} from 'vue';
	//导入新增帖子接口
	import {
		listTopic,
		addTopic
	}
	from '@/api/topic'
	const topicName = ref(''); //主题名称
	//点击发布，即（发布主题）
	function release(topicName) {
		// console.log(topicName, 'eeeeeeeeeeee')
		addTopic({
			topicName: topicName
		}).then((res) => {
			// console.log(res, 'res是个啥')
		})

	}
	const change = (() => {

	})
</script>

<style lang="scss" scoped>
	.text-textarea {
		margin-top: 20rpx;
	}

	//CSS深度查询
	:deep(.u-textarea) {
		background-color: rgba(242, 242, 242, 1);
	}

	.ccc {
		padding: 20px;
	}

	.bottom-sumit {
		position: fixed;
		bottom: 150rpx;
		background-color: rgba(255, 255, 255, 1);
		width: 100%;

		.bottom-sumit-text {
			width: auto;
			height: 70rpx;
			line-height: 70rpx;
			text-align: center;
			border-radius: 36rpx;
			background-color: rgba(255, 98, 0, 1);
			color: rgba(255, 255, 255, 1);
			margin: 18rpx 40rpx;
		}
	}

	:deep(.uni-navbar) {
		display: flex;
		background-color: #fff;
		justify-content: center;
	}
</style>